import "./index.scss"
import { LgCalendarA, LgCalendarAProps } from "./LgCalendarA"
import { LgCalendarB, LgCalendarBProps } from "./LgCalendarB"
import { LgCalendarC, LgCalendarCProps } from "./LgCalendarC"
import { LgCalendarDProps, LgCalendarD } from "./LgCalendarD"
import { CalendarEProps, LgCalendarE } from "./LgCalendarE"

export * from "./LgCalendarA"
export * from "./LgCalendarD"
export * from "./LgCalendarE"
export * from "./LgCalendarC"

export interface CalendarProps {
    type: "A" | "B" | "C" | "D" | "E"
    props: LgCalendarAProps | LgCalendarBProps | LgCalendarCProps | CalendarEProps | LgCalendarDProps
}

export function LgCalendar(props: CalendarProps) {
    switch (props.type) {
        case "A": {
            const currentProps = props.props as LgCalendarAProps
            return (
                <LgCalendarA {...currentProps}></LgCalendarA>
            )
        }
        case "B":{
            const currentProps = props.props as LgCalendarBProps
            return (
                <LgCalendarB {...currentProps}></LgCalendarB>
            )
        }
        case "C":{
            const currentProps = props.props as LgCalendarCProps
            return (
                <LgCalendarC {...currentProps}></LgCalendarC>
            )
        }
        case "D": {
            const currentProps = props.props as LgCalendarDProps
            return (
                <LgCalendarD {...currentProps} />
            )
        }
        case "E": {
            const currentProps = props.props as CalendarEProps
            return (
                <LgCalendarE {...currentProps} />
            )
        }
        default:
            return (
                <></>
            )
    }
}